package com.ijianji.module_zhuanzhu.ui

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.fragment.app.Fragment
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.fenghuajueli.libbasecoreui.viewmodel.BaseViewModelActivity2
import com.fenghuajueli.module_route.ZhuanZhuModuleRoute
import com.ijianji.module_zhuanzhu.R
import com.ijianji.module_zhuanzhu.databinding.ActivityZhuanZhuSettingBinding
import com.ijianji.module_zhuanzhu.model.ZhuanZhuModel

@Route(path = ZhuanZhuModuleRoute.ACTIVITY_ZHUANZHU_SETTING)
class ZhuanZhuSettingActivity : BaseViewModelActivity2<ZhuanZhuModel, ActivityZhuanZhuSettingBinding>() {

    override fun createViewModel(): ZhuanZhuModel {
        return ZhuanZhuModel()
    }

    override fun createViewBinding(): ActivityZhuanZhuSettingBinding {
        return ActivityZhuanZhuSettingBinding.inflate(layoutInflater)
    }

    override fun initView() {
        val objectFragment = ARouter.getInstance().build(ZhuanZhuModuleRoute.FRAGMENT_ZHUANZHU_SETTING).navigation()
        if (objectFragment != null) {
            val beginTransaction = supportFragmentManager.beginTransaction()
            beginTransaction.replace(R.id.fragmentContainer, objectFragment as Fragment)
            beginTransaction.commit()
        }
    }

}